package SingleMachineArrangeImpl;

import java.util.List;

public abstract class SingleMachineArrange {
    static class Artifact{
        int process,remain_process;
        boolean isComplete;
        int ready;
        int weight;
        int due;

        @Override
        public String toString() {
            return "{" +
                    "p=" + process +
                    ", r=" + ready +
                    ", w=" + weight +
                    ", d=" + due +
                    '}';
        }
    }
    List<Artifact> artifacts;
    int[] process,ready,weight,due;
    public SingleMachineArrange setProcess(int[] process) {
        this.process = process;
        return this;
    }
    public SingleMachineArrange setReady(int[] ready) {
        this.ready = ready;
        return this;
    }
    public SingleMachineArrange setWeight(int[] weight) {
        this.weight = weight;
        return this;
    }
    public SingleMachineArrange setDue(int[] due) {
        this.due = due;
        return this;
    }

    public abstract void solve();
    protected static final int COMPLETE = -1;
    public static void main(String[] args) {
//        new SingleMachineArrangeImpl.WSPT().solve(new int[]{11,9,7,8,6,7},null,new int[]{1,2,3,5,5,4},null);
//        new SingleMachineArrangeImpl.ECT().solve(new int[]{10,13,16,18,20,15},new int[]{23,33,32,14,17,16},null,null);
//        new SingleMachineArrangeImpl.EST().solve(new int[]{10,13,16,18,20,15},new int[]{23,33,32,14,17,16},null,null);
//        new SingleMachineArrangeImpl.EDD().solve(new int[]{3, 2, 5, 1, 4, 4, 3, 6},null,null,new int[]{4, 11, 16, 24, 15, 16, 9, 13});
//        new SingleMachineArrangeImpl.EDDx().solve(new int[]{4, 3, 2, 7, 6, 5},new int[]{1, 3, 1, 3, 4, 7},null,new int[]{12, 18, 22, 11, 10, 19});
//        new SingleMachineArrangeImpl.EDDr().solve(new int[]{4, 3, 2, 6, 7, 5},new int[]{2, 0, 1, 4, 3, 5},null,new int[]{12, 8, 10, 14, 18, 20});
//        new SingleMachineArrangeImpl.EDDrp1().solve(new int[]{2,2},new int[]{0, 1},null,new int[]{7, 5});
        // 253 268 280 299 347
//        new SingleMachineArrangeImpl.EDDpd().solve(new int[]{92, 511, 120, 88, 113},null,null,new int[]{280, 268, 299, 253, 347});
//        new SingleMachineArrangeImpl.DAC().solve(new int[]{7, 5, 8, 3, 4, 7, 9},null,null,new int[]{10, 8, 13, 18, 21, 24, 19});
        new WDAC().setProcess(new int[]{10, 12, 19, 29}).setWeight(new int[]{18, 12, 9, 68}).setDue(new int[]{122, 130, 108, 100}).solve();
    }

}
